WebCam2000

WebCam2000 (WC2K) is a program for serving live still pictures on the Internet.   It can serve the picture as a JPEG image or a bitmap file and can be used as a standalone web server or as the backend to a CGI script.  This version of WC2K requires:

Copyright Info

The WebCam2000 is by Paul Chinn but is completely free for any use.  Please enjoy.   You can reach me at loomer@1000klub.com and updates can be found at the WebCam2000 Homepage at http://www.1000klub.com/~loomer/webcam2000

Installing

WebCam2000 only has 3 files: "WebCam2000.exe", "overlay.bmp" and  "capoff.bmp"- to install, just put these files in the directory of your choice.  To uninstall, delete them.

Using the program.

After starting the program you will see a blank window and the menu:

File  Video  Options  Help

Video

The Video menu contains a list of all Video For Windows capture devices on your system.   Select the one you want to take pictures.  After you choose the capture device a checkmark will appear by it and you will see the image it takes in the main window.  Only one device can be selected at a time: if you choose another device (assuming you have more than one on your system) the first will be turned off.  You can turn off the capture device completely by selecting it again. (see below for information about the "capoff.bmp" file)

Also under the Video menu are the options "Source", "Format" and "Display".  Which of these is available depends on your capture device as does their function.  Selecting them brings up dialog boxes that are specific to your device but should be familiar to you from using other video applications.

In the main window you can click the "View Preview" button to toggle a live video preview of the image capture.  Some capture devices consume a lot of CPU power so you can turn the preview off if your system seems to slow down.

Checking "Enable Web Server" starts serving the images. You can see the results by using your web browser and the URL http://localhost:8080.   If the server is not enabled, people will be unable to contact your computer and will receive an error message in their browser.  See below for information on the "capoff.bmp" file for another, user friendly, way to disable image capture temporarily.


Options

The Options menu contains two options.

"Web Server...",  lets you alter settings related to the image server.   The defaults are probably fine for most people.  The options dialog looks like this:

server.gif (3562 bytes)

  1. Enable Web Server - this is the same as the check box in the main window and turns the server off and on
  2. Web Server Port- this is the TCP port the server "listens" on.
  3. Include HTTP headers - if this is checked the image is returned with  HTTP information describing the content.  This lets WebCam2000 function as a complete standalone web server that will properly give an image to any browser.  If unchecked, the image will be served "raw" with no header.  This mode is useful when you want WebCam2000 to act as the back end to a CGI-script and want an unmodified image for further processing.
  4. Image Type- the image can be JPEG or bitmap.  JPEG has the advantage that browsers will display the image themselves "inline".  If you use bitmaps most browsers open the image in another program.  On the other hand JPEG compression causes loss in the picture whereas BMP sends the picture uncompressed.

You can also change several aspects of the image using the "Image..." menu entry:

image.gif (5774 bytes)

  1. Image Size- Choose "Capture Default" to use the size of the image as given by the video capture device.  Or you can select whatever size you want by entering values in the Width and Height fields.  The captured image is stretched or compressed to fit in these dimensions.  In general these values correspond to the number of pixels you want however the following values have special meaning:

    1 = use the captured image's size divided by 2
    2-5 = scale the capture image's size by this much

    For example- say your capture device gives a picture that is 100x100.  By entering 1 into the Width and Height fields you would get a shrunken image 50x50.  If you put 2 in the Width field and 30 in Height you'd get an image 200x30.

  2. Overlay Image- check this box to overlay the file "overlay.bmp" on top of the captured image.  Webcam2000 comes with a sample "overlay.bmp" but you can replace it with any file you want of any size.  By selecting "This color is transparent" you specify the color that will be invisible when "overlay.bmp" is copied on top of the captured image.  

    IMPORTANT NOTE- There is a problem with overlay images when your screen depth is less than 24 bits.  I am looking into how to solve this but until I do, you must run WebCam2000 on a computer with TrueColor video mode to use the overlay image.  Otherwise you will get garbage overlaid on your image.

  3. JPEG Quality- Use this to set the compression level of your image. 

    "Excellent" = better image quality = less compression = bigger file.
    "Poor" = reduced image quality = more compression = smaller file.

    Experiment with the slider to find the optimal balance for your image.

  4. Include Captions- you can have up to 6 different text captions overlaid onto your image.   To enable a caption click its checkbox and a caption editor dialog (see below) will appear.  To edit a caption that is already checked simply uncheck it then check it.

When you check a caption in the "Include Captions" section you get the following dialog:

Caption.gif (4902 bytes)

  1. Horizontal Position- Choose the horizontal placement of the caption.  If you want to specify the exact pixel location, choose the last radio button and enter the value in the text box.
  2. Vertical Position- Same as A but for vertical placement
  3. Text Color- choose the color of the text
  4. Background Color- select the first radio button to specify the background color of the text.  In this case the text will have a solid rectangular background of the chosen color.  If you choose "Transparent" then the text will appear directly on the image.  Example:

    textmode.gif (76654 bytes)

  5. Font- brings up the standard system font selector dialog to choose the font and size for the text.
  6. Caption- Edit the text of the caption.  You can use the percent character "%" with letters to get various timestamp formats:
    %a -  Abbreviated weekday name
    %A -  Full weekday name
    %b -  Abbreviated month name
    %B - Full month name
    %c - Date and time formatted for locale. (Example in U.S.A: "01/01/99 12:54:25")
    %d - Day of month as number (01 – 31)
    %H - Hour in 24-hour format (00 – 23)
    %I - Hour in 12-hour format (01 – 12)
    %j - Day of year as decimal number (001 – 366)
    %m - Month as decimal number (01 – 12)
    %M - Minute as decimal number (00 – 59)
    %p - Current locale's A.M./P.M. indicator for 12-hour clock
    %S - Second as decimal number (00 – 59)
    %U - Week of year as decimal number, with Sunday as first day of week (00 – 51)
    %w - Weekday as decimal number (0 – 6; Sunday is 0)
    %W - Week of year as decimal number, with Monday as first day of week (00 – 51)
    %x - Date representation for current locale
    %X - Time representation for current locale
    %y - Year without century, as decimal number (00 – 99)
    %Y - Year with century, as decimal number
    %z, %Z -  Time-zone name or abbreviation; no characters if time zone is unknown
    %% - Percent sign

File

You can use "Save Settings" under the File menu to save all the settings which will be restored automatically every time you start the program.   Note:  The settings provided in the various capture device specific dialogs(Source, Format and Display) are not saved.  Whether these values are saved or not appears to be device specific and not within WebCam2000's control.   If anybody has information on how to save these settings please let me know.


Once you've set the server up and are happy with the images it is capturing you can minimize it to get it out of the way.  An icon will appear in the System Tray that displays the status of the image server:

weboff.gif (108 bytes) - a little video camera alone means the server is off so no images will be served
webon.gif (173 bytes) - a video camera with a globe means your camera is on The Net and live to the world- don't do anything I wouldn't do! =^) 

Double clicking the tray icon will restore the window to its normal size.


"capoff.bmp"

If no capture device is selected but the server is on, the image in the file "capoff.bmp" will be served to people who contact your server.  You can replace this file with any bitmap file you like of any dimension.  If WebCam2000 is configured to serve JPEG images, "capoff" will be automatically converted to a JPEG image.  This way you can take your camera offline temporarily  but keep visitors informed via a message.   The included "capoff.bmp" contains a plug for the WebCam2000.